React for Designers by Design+Code

React for Designers by Design+Code

Author:Design+Code
Language: eng
Format: epub
Published: 2018-07-25T16:00:00+00:00


const Card = props => ( <div className="Card"> <img src={props.image} /> <h3>{props.title}</h3> <p>{props.text}</p> </div> )

Create Card CSS and Import

Right-click the components folder and create a new Card.css file. Then, let’s import that CSS.

// components/Card.js import './Card.css'

Card CSS

Inside the newly created Card.css, we’ll apply a hover animation which will use scale transform and additionally, we’ll also use translate on the image inside. Notice that we can target the img even on :hover.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.